package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class FeaturedChannel implements Sequenceable, Serializable {
    @SerializedName("trackingParams")
    private String trackingParams;
    @SerializedName("watermark")
    private Watermark watermark;
    @SerializedName("subscribeButton")
    private SubscribeButton subscribeButton;
    @SerializedName("startTimeMs")
    private String startTimeMs;
    @SerializedName("channelName")
    private String channelName;
    @SerializedName("endTimeMs")
    private String endTimeMs;
    @SerializedName("navigationEndpoint")
    private NavigationEndpoint navigationEndpoint;

    public static final Sequenceable.Producer<FeaturedChannel> CREATOR = new Producer<FeaturedChannel>() {
        @Override
        public FeaturedChannel createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            FeaturedChannel featuredChannel = new FeaturedChannel();
            featuredChannel.unmarshalling(parcel);
            return featuredChannel;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.trackingParams);
        parcel.writeSequenceable(this.watermark);
        parcel.writeSequenceable(this.subscribeButton);
        parcel.writeString(this.startTimeMs);
        parcel.writeString(this.channelName);
        parcel.writeString(this.endTimeMs);
        parcel.writeSequenceable(this.navigationEndpoint);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.trackingParams=parcel.readString();
        parcel.readSequenceable(this.watermark);
        parcel.readSequenceable(this.subscribeButton);
        this.startTimeMs=parcel.readString();
        this.channelName=parcel.readString();
        this.endTimeMs=parcel.readString();
        parcel.readSequenceable(this.navigationEndpoint);
        return true;
    }

    @Override
    public String toString() {
        return "FeaturedChannel{" +
                "trackingParams = '" + trackingParams + '\'' +
                ",watermark = '" + watermark + '\'' +
                ",subscribeButton = '" + subscribeButton + '\'' +
                ",startTimeMs = '" + startTimeMs + '\'' +
                ",channelName = '" + channelName + '\'' +
                ",endTimeMs = '" + endTimeMs + '\'' +
                ",navigationEndpoint = '" + navigationEndpoint + '\'' +
                "}";
    }

    public String getTrackingParams() {
        return trackingParams;
    }

    public void setTrackingParams(String trackingParams) {
        this.trackingParams = trackingParams;
    }

    public Watermark getWatermark() {
        return watermark;
    }

    public void setWatermark(Watermark watermark) {
        this.watermark = watermark;
    }

    public SubscribeButton getSubscribeButton() {
        return subscribeButton;
    }

    public void setSubscribeButton(SubscribeButton subscribeButton) {
        this.subscribeButton = subscribeButton;
    }

    public String getStartTimeMs() {
        return startTimeMs;
    }

    public void setStartTimeMs(String startTimeMs) {
        this.startTimeMs = startTimeMs;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getEndTimeMs() {
        return endTimeMs;
    }

    public void setEndTimeMs(String endTimeMs) {
        this.endTimeMs = endTimeMs;
    }

    public NavigationEndpoint getNavigationEndpoint() {
        return navigationEndpoint;
    }

    public void setNavigationEndpoint(NavigationEndpoint navigationEndpoint) {
        this.navigationEndpoint = navigationEndpoint;
    }
}
